home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
BGRAPHH.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
63 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_BarGraphH(TopRow,TopCol,BotRow,BotCol,Degree_Prcnt,Fore_Char,Back_Char,Fore_
Color,Back_Color,Final_Only,Use_Zero) --> NIL
PARAMETERS:
TopRow : Top Row (Maximum range) of Bargraph
TopCol : Top Left Column of Bargraph
BotRow : Bottom Row (Minimum Range) of Bargraph
BotCol : Bottom Right Column of Bargraph
Degree_Prcnt : Percent of Bar to Graph
Fore_Char : Graph Charcater (what to draw with)
Back_Char : Background Character (what to draw on)
Fore_color : ForeGround Color to Use
Back_Color : background Color to Use
Final_Only : Logical - Print Whole Bar or just Top Character
Use_Zero : Locgical - Graph Bottom char if Percent 0 < n < 1
SHORT:
Provides a horizontal bargraph based upon "percent."
DESCRIPTION:
_BarGraphH() performs the same thing as _BarGraphV(), but along a
horizontal axis.
NOTE:
See KLIPPER.CH for alternate calling conventions using #xtrans.
EXAMPLE:
#define DEGREE 67
_Box(1,09,03,71)
@ 04,10 say '100 %'+' (' + ltrim(str(DEGREE)) + '% COMPLETE)'
@ 04,24 say ' 75 %'
@ 14,39 say ' 50 %'
@ 14,54 say ' 25 %'
@ 24,68 say ' 0 %'
_BarGraphV(02,10,02,70,DEGREE,'█','░',,'b/n')
Result: A graph similar to the following is built:
┌────────────────────────────────────────────────────────────┐
│█████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░│
└────────────────────────────────────────────────────────────┘
0% 25% 50% 75% 100%
Notice that the _BarGraphH() function is responsible only for the
actual bargraph itself. The box and the labels were drawn manually.
******************************************************************************/